xen.git
19 years ago[IA64] don't allow non-dom0 domains to set pte memory attributes
awilliam@xenbuild.aw [Wed, 21 Jun 2006 16:25:00 +0000 (10:25 -0600)]
[IA64] don't allow non-dom0 domains to set pte memory attributes

  domUs shouldn't be allowed to set arbitrary memory attributes.
This could allow accessing system memory with uncached attributes,
leading to address aliasing, unsupported transactions, or worse.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] create MDT entry to cover fw_mem area in dom_fw_init()
awilliam@xenbuild.aw [Wed, 21 Jun 2006 16:15:46 +0000 (10:15 -0600)]
[IA64] create MDT entry to cover fw_mem area in dom_fw_init()

 - create MDT entry for fw_mem area on dom0 & domU
 - leave a hole for this region in dom_fw_dom0_lowmem()
 - move inline macros definitions out of function
 - consolidate to single conventional memory adding routine for dom0/domU

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] build linux kernel without using asm-xsi-offsets.h
awilliam@lappy [Tue, 20 Jun 2006 23:02:22 +0000 (17:02 -0600)]
[IA64] build linux kernel without using asm-xsi-offsets.h

All the relevent information are already exported with arch-ia64.h
Use linux asm-offsets.h to write xsi offsets defines.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
[Removed xen-mkbuildtree-post/-pre]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] check address clash with Xen for itc/ptc/itr/ptr
awilliam@lappy [Tue, 20 Jun 2006 22:29:59 +0000 (16:29 -0600)]
[IA64] check address clash with Xen for itc/ptc/itr/ptr

Panic domain if the address is within the Xen virtual space.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] purge stale tlb entry in ia64_do_page_fault()
awilliam@lappy [Tue, 20 Jun 2006 22:21:13 +0000 (16:21 -0600)]
[IA64] purge stale tlb entry in ia64_do_page_fault()

fix ia64_do_page_fault(). When it determines to again, it might remains stale
entry in tlb entry hoping next tlb imsert may purge it.
But if reflects faults, the stale entry remains. it must be purged.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] Fix for ptc.ga emulation
awilliam@lappy [Tue, 20 Jun 2006 22:05:17 +0000 (16:05 -0600)]
[IA64] Fix for ptc.ga emulation

If switch to idle domain after vhpt_purge in ptc_ga emulation,
shouldn't switch rr7 and pta. Only disable VHPT needed. If no,
Smp VTi will hang whole system due to fault.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
19 years ago[IA64] Create vpsr_pp in privregs instead of using tmp[8].
awilliam@xenbuild.aw [Tue, 20 Jun 2006 21:56:48 +0000 (15:56 -0600)]
[IA64] Create vpsr_pp in privregs instead of using tmp[8].

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] fix mfn_to_local_pfn() for dma context
awilliam@xenbuild.aw [Tue, 20 Jun 2006 16:40:14 +0000 (10:40 -0600)]
[IA64] fix mfn_to_local_pfn() for dma context

Thanks to Kevin for tracking down this problem.  This is a temporary
solution until we come up with something better for ia64.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] dummy print_stack() func for NO_TRANSLATION path
awilliam@xenbuild.aw [Mon, 19 Jun 2006 20:55:13 +0000 (14:55 -0600)]
[IA64] dummy print_stack() func for NO_TRANSLATION path

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] fix ptc.ga virtualization
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:45:42 +0000 (13:45 -0600)]
[IA64] fix ptc.ga virtualization

fix ptc.ga virtualization. Uninitialized vcpu doesn't need tlb flush.
ptc_ga_remote_func() calls vmx_vcpu_ptc_l() in IPI context.
I.e. vcpu may not equal to current. On the other hand vmx_vcpu_ptc_l()
assumes vcpu = current. remove the assumption.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] display vmx fault messges
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:42:34 +0000 (13:42 -0600)]
[IA64] display vmx fault messges

This patch modifies the vmx fault handler to display a message when a
fault occurs in hypervisor.

This includes the followings:

- Break 0 handler is modified to check psr.vm bit instead of cpl.
- External interrupt handler is modified to get current using
MINSTATE_GET_CURRENT instead of r21.  r21 has been used in DO_SAVE_MIN
which is called from other fault handlers.  I'm not sure why the
original vmx fault handler gets the current from r21.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>
19 years ago[IA64] fix is_kernel_text in xenctx and show more registers
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:35:49 +0000 (13:35 -0600)]
[IA64] fix is_kernel_text in xenctx and show more registers

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
19 years ago[IA64] enable xenctx on ia64
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:26:45 +0000 (13:26 -0600)]
[IA64] enable xenctx on ia64

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] add comments on smp
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:15:31 +0000 (13:15 -0600)]
[IA64] add comments on smp

add notes on smp to mm.c

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] remove unnecessary vtlb_lock
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:13:01 +0000 (13:13 -0600)]
[IA64] remove unnecessary vtlb_lock

remove vtlb_lock.
As Tristan pointed out, vtlb_lock is unnecesary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add get_page() to prevent from freeing page
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:06:53 +0000 (13:06 -0600)]
[IA64] add get_page() to prevent from freeing page

get_page() when access a page of domain.
pages can be removed from domain and freed by another cpu.
To prevent accessing freeing page, use get_page() and put_page()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] fix races caused by p2m entry update
awilliam@xenbuild.aw [Mon, 19 Jun 2006 19:00:37 +0000 (13:00 -0600)]
[IA64] fix races caused by p2m entry update

fixed some races in ia64_do_page_fault(), vcpu_itc_i(), vcpu_itc_d() and vcpu_fc().
introduce struct p2m_entry and check it later and try it again.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add INVALID_MFN check to dom0vp_zap_physmap()
awilliam@xenbuild.aw [Mon, 19 Jun 2006 18:54:34 +0000 (12:54 -0600)]
[IA64] add INVALID_MFN check to dom0vp_zap_physmap()

guest_physmap_remove_page() should check mfn.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add volatile to p2m table pte entry
awilliam@xenbuild.aw [Mon, 19 Jun 2006 18:52:38 +0000 (12:52 -0600)]
[IA64] add volatile to p2m table pte entry

add volatile pte entry of the p2m table.
Since p2m table are shared by cpu. volatile is needed.
fix the races in pte access of __assign_domain_page() and
destroy_grant_host_mapping()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add volatile to mpt_table
awilliam@xenbuild.aw [Mon, 19 Jun 2006 18:13:11 +0000 (12:13 -0600)]
[IA64] add volatile to mpt_table

mpt_table is accessed concurrently by cpus, so it needs volatile qualifier

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years agomerge with xen-unstable.hg
awilliam@xenbuild.aw [Fri, 16 Jun 2006 16:18:54 +0000 (10:18 -0600)]
merge with xen-unstable.hg

19 years agomerge with xen-unstable.hg
awilliam@xenbuild.aw [Fri, 16 Jun 2006 15:10:08 +0000 (09:10 -0600)]
merge with xen-unstable.hg

19 years ago[IA64] cleanup
awilliam@xenbuild.aw [Fri, 16 Jun 2006 15:06:40 +0000 (09:06 -0600)]
[IA64] cleanup

Disable a privify path.
Cleanup: warnings and static.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[XEN] New memory_op XENMEM_exchange. Allows atomic
kfraser@dhcp93.uk.xensource.com [Fri, 16 Jun 2006 13:43:54 +0000 (14:43 +0100)]
[XEN] New memory_op XENMEM_exchange. Allows atomic
exchange of one memory reservation for another of the
same size, but with different properties.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Export new gnttab_cancel_free_callback() to modules.
kaf24@firebug.cl.cam.ac.uk [Fri, 16 Jun 2006 09:52:49 +0000 (10:52 +0100)]
[LINUX] Export new gnttab_cancel_free_callback() to modules.
Signed-off-by: Charles Arnold <carnold@novell.com>
19 years agomerge with xen-unstable.hg
awilliam@xenbuild.aw [Thu, 15 Jun 2006 16:23:57 +0000 (10:23 -0600)]
merge with xen-unstable.hg

19 years ago[IA64] enable Xen compilation with debug=y
awilliam@xenbuild.aw [Thu, 15 Jun 2006 16:02:53 +0000 (10:02 -0600)]
[IA64] enable Xen compilation with debug=y

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] reset_system
awilliam@xenbuild.aw [Thu, 15 Jun 2006 15:51:58 +0000 (09:51 -0600)]
[IA64] reset_system

Cleanup: EFI_RESET_SYSTEM now always calls domain_shutdown.
machine_restart and machine_halt calls efi reset_system to do their job.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] cleanup in domain.c
awilliam@xenbuild.aw [Thu, 15 Jun 2006 15:47:19 +0000 (09:47 -0600)]
[IA64] cleanup in domain.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] work around for skbuff_ctor() on non-privileged domain
awilliam@xenbuild.aw [Thu, 15 Jun 2006 15:10:14 +0000 (09:10 -0600)]
[IA64] work around for skbuff_ctor() on non-privileged domain

populate physmap/increase reservation hypercall fail with
extent order > 0 on non-privileged domain.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] fix garbage in irq_ia64.c kernel message
awilliam@xenbuild.aw [Thu, 15 Jun 2006 14:56:47 +0000 (08:56 -0600)]
[IA64] fix garbage in irq_ia64.c kernel message

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] clean up "assign domain page ... already mapped!" printks
awilliam@xenbuild.aw [Thu, 15 Jun 2006 14:46:43 +0000 (08:46 -0600)]
[IA64] clean up "assign domain page ... already mapped!" printks

Signed-off-by: Al Stone <ahs3@fc.hp.com>
19 years ago[IA64] do not use interrupt_mask_addr inside Xen
awilliam@xenbuild.aw [Thu, 15 Jun 2006 14:42:34 +0000 (08:42 -0600)]
[IA64] do not use interrupt_mask_addr inside Xen

Create current_psr_i_addr per cpu variables.
Inside Xen, do not use interrupt_mask_addr because it can be modified by
the guest.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[LINUX][PAE] Fix e820 setup for PAE guests: preserve high-order bits of max_pfn.
kaf24@firebug.cl.cam.ac.uk [Thu, 15 Jun 2006 12:30:35 +0000 (13:30 +0100)]
[LINUX][PAE] Fix e820 setup for PAE guests: preserve high-order bits of max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[MINI-OS] Fix for event initialisation in Mini-OS. All events are masked when
kaf24@firebug.cl.cam.ac.uk [Thu, 15 Jun 2006 12:20:43 +0000 (13:20 +0100)]
[MINI-OS] Fix for event initialisation in Mini-OS. All events are masked when
the system is started up. This prevents from getting spurious events
between hypercall to bind an event-channel and registering
appropriate event handler.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
19 years ago[LINUX] Network buffers do not need to be multi-page contiguous
kaf24@firebug.cl.cam.ac.uk [Thu, 15 Jun 2006 12:19:04 +0000 (13:19 +0100)]
[LINUX] Network buffers do not need to be multi-page contiguous
for unprivileged domains (in any case, can fall back to swiotlb).
On non-privileged domain of Xen/IA64, this caused some trouble.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.
kaf24@firebug.cl.cam.ac.uk [Thu, 15 Jun 2006 12:11:31 +0000 (13:11 +0100)]
[TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.
No longer open the device as non-blocking: all reads immediately follow
a select() on the device indicating it's ready to read.

Signed-off-by: John Levon <john.levon@sun.com>
19 years agoCatch ValueError and OverflowError, to diagnose bad arguments.
emellor@leeni.uk.xensource.com [Thu, 15 Jun 2006 10:52:23 +0000 (11:52 +0100)]
Catch ValueError and OverflowError, to diagnose bad arguments.

Signed-off-by: Hiroyuki Yamamoto <yamamoto.hiroyu@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
19 years ago[LINUX] Only destroy a machine-contiguous memory region if
kaf24@firebug.cl.cam.ac.uk [Thu, 15 Jun 2006 10:35:23 +0000 (11:35 +0100)]
[LINUX] Only destroy a machine-contiguous memory region if
it really is contiguous (e.g., create_contiguous did not fail).
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] let VMM do itc sync for guest on VTI domain
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:45 +0000 (16:05 -0600)]
[IA64] let VMM do itc sync for guest on VTI domain

Previously, on SMP VTI-domain, Guest OS was responsible for
syncing itc by calling ia64_sync_itc, but the round trip may
be very large on VTI domain, that may cause guest itcs are
not synced well and cause guest wall clock is not accurate.

This patch intends to fix this issue, when guest wants to sync
itc( vcpus other than vcpu0 write itc), VMM directly get vcpu0
itc for other vcpus.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] cleanup warnings in mm.c
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:44 +0000 (16:05 -0600)]
[IA64] cleanup warnings in mm.c

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
19 years ago[IA64] Fix a bug in vmx_vcpu_pta
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:43 +0000 (16:05 -0600)]
[IA64] Fix a bug in vmx_vcpu_pta

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] Remove redundant ASSIGN_DOMAIN_MACH_PAGE in dom_fw.c
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:42 +0000 (16:05 -0600)]
[IA64] Remove redundant ASSIGN_DOMAIN_MACH_PAGE in dom_fw.c

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
19 years ago[HVM][QEMU] Fix SDL mouse "invisible wall".
kaf24@firebug.cl.cam.ac.uk [Wed, 14 Jun 2006 21:15:13 +0000 (22:15 +0100)]
[HVM][QEMU] Fix SDL mouse "invisible wall".
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
19 years ago[LINUX][PAE] More fixes to pgd allocation. Since allocating pmds
kaf24@firebug.cl.cam.ac.uk [Wed, 14 Jun 2006 16:06:28 +0000 (17:06 +0100)]
[LINUX][PAE] More fixes to pgd allocation. Since allocating pmds
can sleep, we could race save/restore and end up with stale
machine addresses stores in pgd entries. Avoid this by
remembering virtuall addresses and translating to machine
addresses all at the end and protected by the pgd_lock.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Abstract setting of master event-pending flag into asm/event.h.
kfraser@dhcp93.uk.xensource.com [Wed, 14 Jun 2006 12:48:04 +0000 (13:48 +0100)]
[XEN] Abstract setting of master event-pending flag into asm/event.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XENSTAT] Fix two realloc() usage errors in xenstat.
kfraser@dhcp93.uk.xensource.com [Wed, 14 Jun 2006 12:31:38 +0000 (13:31 +0100)]
[XENSTAT] Fix two realloc() usage errors in xenstat.
Based on original patch from Jimi Xenidis at IBM.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] front: Discard packets in tx ring rather than attempting retransmit
kaf24@firebug.cl.cam.ac.uk [Wed, 14 Jun 2006 12:11:44 +0000 (13:11 +0100)]
[NET] front: Discard packets in tx ring rather than attempting retransmit
when reconnecting to backend driver (e.g., after save/restore or migrate).

Two main reasons for this:
 1. The retransmit code is broken for fragmented packets. It would need
    a rewrite to cope with the new scatter-gather format.
 2. We will drop packets anyway, in both directions (e.g., takes some
    time for received packets to be redirected to new virtual interface;
    also further transmitted packets from the network stack are dropped
    after we call netif_carrier_off(), so even if we retransmite what's
    already in the ring it is likely that some subsequent packets will
    already be lost).

If this causes downtimes that are too long (particularly for live
relocation) then the whole strategy for buffering packets while the
frontend-backend connection is severed needs to be considered.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
kaf24@firebug.cl.cam.ac.uk [Wed, 14 Jun 2006 11:36:06 +0000 (12:36 +0100)]
[LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
Moving the re-allocation to low memory into pgd_alloc() has several
advantages:
 1. Avoids race with save/restore where pgdir may end up above 4GB after
    save/restore.
 2. If pgdir cannot be re-allocated we can return failure to the caller
    rather than BUG().
 3. Slightly reduces diff against native Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX][BLK] front: More care over device teardown.
kaf24@firebug.cl.cam.ac.uk [Wed, 14 Jun 2006 10:19:53 +0000 (11:19 +0100)]
[LINUX][BLK] front: More care over device teardown.
 1. We must ensure gnttab callbacks are disabled and all work
    flushed before tearing down device state. A new gnttab interface
    call is added for this purpose.
 2. blkif_free() must check for a request_queue before deref'ing it.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] Fix vga acceleration for VTI domain
awilliam@xenbuild.aw [Tue, 13 Jun 2006 21:05:33 +0000 (15:05 -0600)]
[IA64] Fix vga acceleration for VTI domain

Now guest vhpt table of VMX domain is searched to insert some
entry into vtlb on the fly. However previous guard on memory
attribute is only done for guest itc.d emulation. That breaks
VGA acceleration and this patch fixes it by moving check to
right place.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

19 years ago[IA64] Pull changes from xen-unstable.hg cset 10242 into mm.c
awilliam@xenbuild.aw [Tue, 13 Jun 2006 19:13:39 +0000 (13:13 -0600)]
[IA64] Pull changes from xen-unstable.hg cset 10242 into mm.c

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] Remove Makefile entry for xenia64_init
awilliam@xenbuild.aw [Tue, 13 Jun 2006 18:50:47 +0000 (12:50 -0600)]
[IA64] Remove Makefile entry for xenia64_init

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years agomerge with xen-unstable.hg
awilliam@xenbuild.aw [Tue, 13 Jun 2006 18:12:24 +0000 (12:12 -0600)]
merge with xen-unstable.hg

19 years ago[IA64] Define mfn_to_local_pfn()
awilliam@xenbuild.aw [Tue, 13 Jun 2006 17:41:05 +0000 (11:41 -0600)]
[IA64] Define mfn_to_local_pfn()

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[TOOLS] Fix PAE save/restore/migrate: we must flush
kfraser@dhcp93.uk.xensource.com [Tue, 13 Jun 2006 16:30:30 +0000 (17:30 +0100)]
[TOOLS] Fix PAE save/restore/migrate: we must flush
all pending 'mmu updates' before moving page directories
below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] define virt_to_mfn and mfn_to_virt
awilliam@xenbuild.aw [Tue, 13 Jun 2006 15:35:43 +0000 (09:35 -0600)]
[IA64] define virt_to_mfn and mfn_to_virt

These are necessary to build w/ current xen-unstable

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[MINI-OS] Applications that provide their own app_main need not run the xenbus test.
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 15:07:16 +0000 (16:07 +0100)]
[MINI-OS] Applications that provide their own app_main need not run the xenbus test.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
19 years ago[IA64] Revert xen-ia64-unstable.hg cset 10237
awilliam@xenbuild.aw [Tue, 13 Jun 2006 15:00:32 +0000 (09:00 -0600)]
[IA64] Revert xen-ia64-unstable.hg cset 10237

back out the change set 10237 which causes domain creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] Revert xen-ia64-unstable.hg cset 10238
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:59:26 +0000 (08:59 -0600)]
[IA64] Revert xen-ia64-unstable.hg cset 10238

back out the change set 10238 which causes domU creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[LINUX] Eliminates a deadlock and reduce (sometimes significantly) the time
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 14:56:28 +0000 (15:56 +0100)]
[LINUX] Eliminates a deadlock and reduce (sometimes significantly) the time
interrupts are off during context switch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years ago[IA64] cleanup warning in xen/arch/ia64/linux-xen/time.c
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:55:08 +0000 (08:55 -0600)]
[IA64] cleanup warning in xen/arch/ia64/linux-xen/time.c

Remove a wrong cleanup in xen/arch/ia64/linux-xen/time.c
itc_ratio.num and itc_ratio.den are defined u64
in xen/include/asm-ia64/linux-xen/asm/pal.h.
These are the below.

typedef struct pal_freq_ratio {
        u64 den : 32, num : 32; /* numerator & denominator */
} itc_ratio, proc_ratio;

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
19 years ago[IA64] Update efi.c and rework xenheap location
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:45:22 +0000 (08:45 -0600)]
[IA64] Update efi.c and rework xenheap location

This is a port of a newer upsteam efi.c to xen/ia64.  For the most
part, this patch is simply incorporating this upstream linux-ia64
patch into the tree:

http://www.kernel.org/hg/linux-2.6/?cs=fb781f6d3e81

To support this new code, xensetup needed to be modified to relocate
the dom0 kernel and initrd images without using efi_memmap_walk() as
this can no longer be called until after reserve_memory().  The dom0
kernel and initrd images are now only moved if necessary and the xen
MDT entry is expanded to cover the xenheap area and any relocated dom0
bits.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[XM-TEST] Fix 02_block_device_write_verify.py test to parse md5sum output correctly.
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 14:41:27 +0000 (15:41 +0100)]
[XM-TEST] Fix 02_block_device_write_verify.py test to parse md5sum output correctly.

The 02_block_device_write_verify.py test that I wrote is failing because
the regular expression to extract the md5sum is only looking at the
first line of output and the sum is in a subsequent line (after the
output from dd).

This patch fixes the test by adding the multiline flag to the search
parameters so that the search looks in all lines of the output for the
md5sum.  I added the multiline flag in all searches to make the tests
more robust against changes in the output format of the commands used.

I'm not exactly sure how this slipped through my testing.  I suspect
that I forgot to install the new python file after updating the test to
use dd and then tested the old version a second time by accident.
Either that or it really did work when I tested it and the output format
has changed for some reason.

I tested this patch against xen-unstable 10326 and the 02 test fails
without the patch and succeeds with it.

Thanks to James Dykman for some help with this.

Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>

19 years ago[ACM] Provide the framework needed for resource labeling.
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 14:38:58 +0000 (15:38 +0100)]
[ACM] Provide the framework needed for resource labeling.

Subsequent patches will follow in the coming weeks that will enable
Xen ACM to control assignment of resources (e.g., block devices and
networking) to virtual machines based on resource labels and the
active security policy.

Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com>
Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
19 years ago[LINUX] A better way to stop blkdev request handling in blkfront
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 14:33:10 +0000 (15:33 +0100)]
[LINUX] A better way to stop blkdev request handling in blkfront
driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoMerge.
sos22@douglas.cl.cam.ac.uk [Tue, 13 Jun 2006 14:19:50 +0000 (15:19 +0100)]
Merge.

19 years agoExpand test_xenbus a little.
sos22@douglas.cl.cam.ac.uk [Tue, 13 Jun 2006 14:19:09 +0000 (15:19 +0100)]
Expand test_xenbus a little.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years agoThis patch exposes XenBus functions to Mini-OS applications.
sos22@douglas.cl.cam.ac.uk [Tue, 13 Jun 2006 14:17:01 +0000 (15:17 +0100)]
This patch exposes XenBus functions to Mini-OS applications.

Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
19 years ago[LINUX] Fix blkfront driver to check connection status to backend in
kfraser@dhcp93.uk.xensource.com [Tue, 13 Jun 2006 14:13:29 +0000 (15:13 +0100)]
[LINUX] Fix blkfront driver to check connection status to backend in
all critical circumstances.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[TOOLS][BUILDER] Extend Elf header checks for multiple architectures.
kfraser@dhcp93.uk.xensource.com [Tue, 13 Jun 2006 13:36:04 +0000 (14:36 +0100)]
[TOOLS][BUILDER] Extend Elf header checks for multiple architectures.
Based on a patch from Hollis Blanchard.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Export some tlb-flush functions to modules, which are
kfraser@dhcp93.uk.xensource.com [Tue, 13 Jun 2006 13:08:37 +0000 (14:08 +0100)]
[LINUX] Export some tlb-flush functions to modules, which are
directly accessible via macros in tlbflush.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Fix ioemu build with new Linux headers. We must define __user
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 10:41:15 +0000 (11:41 +0100)]
[HVM] Fix ioemu build with new Linux headers. We must define __user
attribute to nothing.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Fix compatibility with future guests which may try to
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 10:28:20 +0000 (11:28 +0100)]
[XEN] Fix compatibility with future guests which may try to
use hypercalls >= NR_hypercalls. These must fail with ENOSYS,
but the current strategy of masking off the high-order bits of
the hypercall number means we instead map those hypercalls onto
lower-numbered hypercalls with unpredictable results. This patch
replaces masking with an explicit compare-and-jump.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat
Ian.Campbell@xensource.com [Tue, 13 Jun 2006 09:14:20 +0000 (10:14 +0100)]
[LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years ago[LINUX] Fix code indentation in Linux drivers.
kfraser@dhcp93.uk.xensource.com [Mon, 12 Jun 2006 17:32:47 +0000 (18:32 +0100)]
[LINUX] Fix code indentation in Linux drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoInitialize the entire hypercall page when running a ring0 kernel
Ian.Campbell@xensource.com [Mon, 12 Jun 2006 17:23:42 +0000 (18:23 +0100)]
Initialize the entire hypercall page when running a ring0 kernel

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoFix race in device resume path - need to ensure we add the watch only
shand@chelmsford.uk.xensource.com [Mon, 12 Jun 2006 16:56:20 +0000 (17:56 +0100)]
Fix race in device resume path - need to ensure we add the watch only
after the device-specific resume code has run. Also removed some unused /
usless code from netfront.c.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years ago[LINUX] Fix interaction between idle loop and RCU subsystem.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 13:17:05 +0000 (14:17 +0100)]
[LINUX] Fix interaction between idle loop and RCU subsystem.

There is a problem with the current implementation of stop_hz_timer in
arch/i386/kernel/time-xen.c where the hz timer can be stopped on a CPU
which has RCU callbacks pending.

This patch backports a new RCU API created to fix this problem for the
s390 implementation of stop_hz_timer and also updates the time-xen.c
implementation of stop_hz_timer to call the new API.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
19 years ago[HVM][VMX] Fix error-detection inline asm code. Zero word-sized
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 11:01:32 +0000 (12:01 +0100)]
[HVM][VMX] Fix error-detection inline asm code. Zero word-sized
register before executing SETNA instruction which updates bottom
byte.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Fix the build with certain versions of gcc.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 09:09:44 +0000 (10:09 +0100)]
[HVM][VMX] Fix the build with certain versions of gcc.
Restrict register choices to this which are byte addressable.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Fix read_console_ring() when passed a small buffer.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 09:05:55 +0000 (10:05 +0100)]
[XEN] Fix read_console_ring() when passed a small buffer.
From: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Clean up unused variable in mm/memory.c.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:57:23 +0000 (09:57 +0100)]
[LINUX] Clean up unused variable in mm/memory.c.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
19 years ago[HVM][VMX] Provide right view of cpuid to the HVM guests.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:45:03 +0000 (09:45 +0100)]
[HVM][VMX] Provide right view of cpuid to the HVM guests.
Some of the CPU features such as APIC, PAE, MTRR, HT are virtualized;
while others are not virtualized yet such as TM1, TM2, MCA and there are
some features which do not need virtualization such as MMX. With the
patch Guest sees only those processor features in the cpuid which are
virtualized in the hyper visor, or do not need any virtualization in
hypervisor.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
19 years ago[HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xen
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:06:55 +0000 (09:06 +0100)]
[HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xen
device model. To support USB there are two new optional config lines
that can be added to the guest config file:

    usb=1
        This will enable USB without defining a specific USB device.
        This option is assumed and not needed if the `usbdevice' option
        is given.

    usbdevice='device'
        This will enable USB and also enable support for the given device.
        Currently, the only two devices are `mouse' (a PS/2 mouse) and
        `tablet' (an absolute pointing device).  The advantage of `tablet'
        is that Windows guests will automatically recognize and support this
        device so specifying the config line:

                usbdevice='tablet'

        will create a mouse that works transparently with Windows guests
        under VNC.  (Linux doesn't recognize the USB tablet yet so Linux
        guests under VNC will still need the Summagraphics emulation.)

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
19 years ago[IA64] Fix a typo in local_event_delivery_enable().
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 07:53:38 +0000 (08:53 +0100)]
[IA64] Fix a typo in local_event_delivery_enable().
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
19 years ago[XEN] Fix SCHEDOP_poll to work even when event channels are
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 18:23:31 +0000 (19:23 +0100)]
[XEN] Fix SCHEDOP_poll to work even when event channels are
not bound to the polling VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Cleanups and fixes to VMCS lifecycle.
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 13:33:16 +0000 (14:33 +0100)]
[HVM][VMX] Cleanups and fixes to VMCS lifecycle.
 1. Maintain a 'launched' software flag to select between
    VMLAUNCH and VMRESUME.
 2. Take more care with VMPTRLD/VMCLEAR.
Also various other fixes (e.g., safe testing of
condition codes after executing a VMX instruction).

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Fix IRQ SMP affinity logic for event channels.
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 08:54:35 +0000 (09:54 +0100)]
[LINUX] Fix IRQ SMP affinity logic for event channels.
The logic now mimics native x86 behaviour: a request to change
affinity via /proc is held until the next interrupt on that
event channel. So /proc/irq/n/smp_affinity may not change
immediately!
Other notes:
 1. CPU-specific interrupts silently ignore requests to change
    affinity. For example, resched0, timer0, callfunc0, ...
 2. Reading smp_affinity always returns a cpumask containing
    a single cpu. An event channel can only be bound to a single
    cpu at a time. Neither Xen nor XenLinux implement IRQ
    balancing: requires a user-space balancing daemon.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Replace direct common-code access of evtchn_upcall_mask
kaf24@firebug.cl.cam.ac.uk [Sat, 10 Jun 2006 10:07:11 +0000 (11:07 +0100)]
[XEN] Replace direct common-code access of evtchn_upcall_mask
with local_event_delivery_* accessors.
Notes:
 1. Still some (read-only, debug) use in keyhandler.c
 2. Still accesses through current->vcpu_info.
Both above may need to be compiled only for architectures
that use event channels.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Remove the only use of evtchn_upcall_mask in common code.
kaf24@firebug.cl.cam.ac.uk [Sat, 10 Jun 2006 10:05:11 +0000 (11:05 +0100)]
[LINUX] Remove the only use of evtchn_upcall_mask in common code.
Replace with an assertion of irq_disabled().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] Change PIB size to 2M
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:40:31 +0000 (10:40 -0600)]
[IA64] Change PIB size to 2M

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] A fix for itc.d emulation
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:45 +0000 (10:35 -0600)]
[IA64] A fix for itc.d emulation

If natpage, insert into TLB directly.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
19 years ago[IA64] add seqlock to protect vtlb
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:43 +0000 (10:35 -0600)]
[IA64] add seqlock to protect vtlb

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] remove some races between the p2m table and the m2p table
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:42 +0000 (10:35 -0600)]
[IA64] remove some races between the p2m table and the m2p table

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] passthrough EFI_ACPI_MEMORY_NVS and EFI_RESERVED_TYPE
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:41 +0000 (10:35 -0600)]
[IA64] passthrough EFI_ACPI_MEMORY_NVS and EFI_RESERVED_TYPE

According to the EFI spec, firmware may describe ACPI tables loaded
at runtime in EFI_RESERVED_TYPE or EFI_ACPI_MEMORY_NVS memory ranges.
This patch adds these to the list of memory types we pass through for
dom0.  This allows Xen to boot on HP Superdomes.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] use get_gpfn_from_mfn()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:40 +0000 (10:35 -0600)]
[IA64] use get_gpfn_from_mfn()

clean up vmx_vcpu_tpa() and mfn_to_gmfn(). don't access mpt_table directly.
use get_gpfn_from_mfn()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] use pte_mem() in relinquish_pte()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:39 +0000 (10:35 -0600)]
[IA64] use pte_mem() in relinquish_pte()

use pte_mem instread of direct bit test in relinquish_pte()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add memory barrier to domain_flush_vtlb_range()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:38 +0000 (10:35 -0600)]
[IA64] add memory barrier to domain_flush_vtlb_range()

add memory barrier to domain_flush_vtlb_range().
vtlb purge must be visible before vhpt invalidation.
added some BUG_ON().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] Add NULL test in domain_page_mapped()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:37 +0000 (10:35 -0600)]
[IA64] Add NULL test in domain_page_mapped()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>